package com.my.roco.dao;

import com.my.roco.pojo.Pet;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PetMapper {
    void insertPet(Pet pet);
    Pet getPetByNumber(String number);
    List<Pet> getPetsByAttribute(String attribute);
    List<Pet> getAllPets();
    List<Pet> searchPets(String keyword);
    
    Pet getPetByName(String name);
    void deletePet(String number); 
    
    List<Pet> getPetsByCondition(
            @Param("keyword") String keyword,
            @Param("attribute") String attribute,
            @Param("sortField") String sortField,
            @Param("sortOrder") String sortOrder
        );

}